package com.xuelang.pipeline.domain.pipeline.repository;


import com.xuelang.pipeline.domain.pipeline.CacheSetting;

import java.util.Date;
import java.util.List;

/**
 * <p>流水线变量配置仓库接口</p>
 *
 * @author : yixin.lys
 * @date : 2024-06-13 13:40
 **/
public interface CacheSettingRepository {

    /**
     * 根据流水线code获取触发配置
     * @param pipelineCode
     * @return
     */
    List<CacheSetting> queryByPipelineCode(String pipelineCode);


    /**
     * 新增触发配置
     * @param cacheSettingList
     * @param creatorId
     * @param createTime
     */
    void addBatch(List<CacheSetting> cacheSettingList, String creatorId, Date createTime);


    /**
     * 更新触发配置
     * @param cacheSettingList
     * @param updaterId
     * @param updateTime
     */
    void updateBatch(List<CacheSetting> cacheSettingList, String updaterId, Date updateTime);


    /**
     * 根据id批量删除
     * @param idList
     */
    void removeByIds(List<Long> idList);

    /**
     * 根据流水线code批量删除
     * @param codeList
     */
    void removeByCodes(List<String> codeList);


}
